import random
import time
aa=0
aaa=0
while True:
    a=[]
    b=random.randint(1,5)
    aa=b
    aaa=aa
    e=aaa
    print(aa,aaa,aa,aaa)
    while aa>=1:
        c=random.randint(1,10)
        a.append(c)
        print(c)
        aa-=1
        time.sleep(1)
    print(a)
    while e>=1:
        d=aaa-e
        print(a[d])
        e-=1
        time.sleep(1)
    print("")